//
//  TeeNetworkManage.h
//  TeeRiskManage
//
//  Created by 祁俊喜 on 2023/4/20.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN


@interface JXNetworkManage : NSObject<NSURLSessionDelegate,NSURLSessionDataDelegate,NSURLSessionDownloadDelegate>

+(instancetype)sharedInstance;

-(void)postWithUrlString:(NSString *)url parameters:(id)parameters success:(void (^)(NSDictionary * _Nullable data))successBlock failure:(void (^)(NSError * _Nullable error))failureBlock;

-(void)getWithUrlString:(NSString *)url success:(void (^)(id data))successBlock failure:(void (^)(NSError * _Nullable error))failureBlock;

-(void)downloadWithUrlString:(NSString *)url progress:(void (^)(NSInteger currentSize,NSInteger totalSize))progress finish:(void (^)(NSString * path))finish;

-(void)cancel;

@end

NS_ASSUME_NONNULL_END
